package lxs.swift.collector.tuple;

import java.util.Objects;

public class Tuple8<T1, T2, T3, T4, T5, T6, T7, T8> implements Tuple {
    public T1 _1;
    public T2 _2;
    public T3 _3;
    public T4 _4;
    public T5 _5;
    public T6 _6;
    public T7 _7;
    public T8 _8;

    protected Tuple8() {
    }

    protected Tuple8(final T1 _1, final T2 _2, final T3 _3, final T4 _4, final T5 _5, final T6 _6, final T7 _7, final T8 _8) {
        this._1 = _1;
        this._2 = _2;
        this._3 = _3;
        this._4 = _4;
        this._5 = _5;
        this._6 = _6;
        this._7 = _7;
        this._8 = _8;
    }

    @Override
    public Object[] toArray() {
        return new Object[]{_1, _2, _3, _4, _5, _6, _7, _8};
    }

    @Override
    public boolean equals(Object o) {
        if (o == this) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Tuple8<?, ?, ?, ?, ?, ?, ?, ?> other = (Tuple8<?, ?, ?, ?, ?, ?, ?, ?>) o;
        return Objects.equals(_1, other._1) && Objects.equals(_2, other._2) && Objects.equals(_3, other._3) && Objects.equals(_4, other._4) && Objects.equals(_5, other._5) && Objects.equals(_6, other._6) && Objects.equals(_7, other._7) && Objects.equals(_8, other._8);
    }

    @Override
    public int hashCode() {
        return Objects.hash(_1, _2, _3, _4, _5, _6, _7, _8);
    }

    @Override
    public String toString() {
        return "Tuple(" + _1 + ", " + _2 + ", " + _3 + ", " + _4 + ", " + _5 + ", " + _6 + ", " + _7 + ", " + _8 + ')';
    }

}
